class Nstr(int):
    def __new__(cls,str1):
        if isinstance(str1,str):
            total=0
            for each_self in str1:
                total += ord(each_self)
            str1=total
        else :
            print('参数错误')
        return int.__new__(cls,str1)

a = Nstr('FishC')
b = Nstr('love')
